package com.example.lib_core.factory;

import androidx.lifecycle.LiveData;

import com.example.lib_core.bean.FoodBean;
import com.example.lib_core.bean.HeadlinesBean;
import com.example.lib_core.bean.NewsListBean;
import com.example.lib_core.bean.NewsTypeBean;
import com.example.lib_core.mvvm.BaseReposter;
import com.example.lib_core.mvvm.BaseViewModel;
import com.fhz.utilsfhz.ApiResponse;

import java.util.List;

public class FragViewModel extends BaseViewModel {
    public FragViewModel(BaseReposter mReposter) {
        super(mReposter);
    }

    public LiveData<ApiResponse<List<FoodBean>>> getFood(){
        return mReposter.getFood();
    }

    public LiveData<ApiResponse<List<NewsTypeBean>>> getNewType(){
        return mReposter.getNewType();
    }

    public LiveData<ApiResponse<List<NewsListBean>>> getNewList(){
        return mReposter.getNewList();
    }

    public LiveData<ApiResponse<List<HeadlinesBean>>> getHeadlines(int newstype,int pagenum,int pagesize){
        return mReposter.getHeadlines(newstype, pagenum, pagesize);
    }
}
